
const {
  mrjAsyncBaseReq, //  基本请求
  BaseRequestModel, // 基本请求对象
} = require('./mrhhttp')
const api_action_add = "/core/merchant/shop/goods/create"
const api_action_delete = "/face/staff/delete"
const api_action_edit = "/face/staff/edit"
const api_load_list = "/face/staff/list"
const api_load_detail = "/core/user/info"
const api_action_bind_guest_and_add = "/face/staff/guest/add";// 绑定访客
const api_action_bind_guest = "/face/staff/guest/bind"

const StaffHttp = {
  actionBindGuest:async param=>{
    const res = await mrjAsyncBaseReq({
      ...BaseRequestModel,
      url: `${BaseRequestModel.baseUrl}${api_action_bind_guest}`,
      param: param
    });
    return res.data
  },
  actionAddBindGuest:async param=>{
    const res = await mrjAsyncBaseReq({
      ...BaseRequestModel,
      url: `${BaseRequestModel.baseUrl}${api_action_bind_guest_and_add}`,
      param: param
    });
    return res.data
  },
  
  actionDelete:async param=>{
    const res = await mrjAsyncBaseReq({
      ...BaseRequestModel,
      url: `${BaseRequestModel.baseUrl}${api_action_delete}`,
      param: param
    });
    return res.data
  },
  actionAdd:async param=>{
    const res = await mrjAsyncBaseReq({
      ...BaseRequestModel,
      url: `${BaseRequestModel.baseUrl}${api_action_add}`,
      param: param
    });
    return res.data
  },
  actionEdit:async param=>{
    const res = await mrjAsyncBaseReq({
      ...BaseRequestModel,
      url: `${BaseRequestModel.baseUrl}${api_action_edit}`,
      param: param
    });
    return res.data
  },
  loadList:async param=>{
    const res = await mrjAsyncBaseReq({
      ...BaseRequestModel,
      url: `${BaseRequestModel.baseUrl}${api_load_list}`,
      param: param
    });
    return res.data
  },
  loadDetail:async param=>{
    const res = await mrjAsyncBaseReq({
      ...BaseRequestModel,
      url: `${BaseRequestModel.baseUrl}${api_load_detail}`,
      param: param
    });
    return res.data
  },
}
module.exports = StaffHttp